RESUMO DA VOTAÇÃO

gráfico

lista dos parlamentares

var chart = function(yes, no, abstention) { var ctx = document.getElementById('myChart1'); var data = { labels: ["SIM", "NÃO", "ABSTENÇÃO"], datasets: [{ label: "Votos", data: [yes, no, abstention], backgroundColor: [ 'green', 'red', 'gray' ], borderColor: [ "#111", "#111", "#111" ], borderWidth: 1 }] }; if (yes == 0 && no == 0 && abstention == 0) { voting = 'VOTAÇÃO' } else if (yes > no) { voting = 'VOTAÇÃO APROVADA' } else { voting = 'VOTAÇÃO REPROVADA' } var options = { animation: false, title: { display: true, position: "top", text: voting, fontSize: 20, fontColor: "#111" }, legend: { display: false }, scales: { yAxes: [{ ticks: { min: 0 } }] } }; new Chart(ctx, { type: "bar", data: data, options: options }); }